﻿using System;

namespace IGMVC.Web.Models
{
    public partial class Issue : IFakeable
    {
        public int Id {get;set;}
        public int IssueTypeId { get; set; }
        public string Title { get; set; }
        public string Description { get; set; }
        public int Severity { get; set; }

        public void CreateFakeData(int id)
        {
            this.Id = id;
            this.Title = string.Format("Title {0}",id);
            this.Description = string.Format("Description {0}", id);

            Random rand = new Random();
            this.Severity = rand.Next(1,5);

            // gives variation to random numbers when 
            // a large number of objects are being generated 
            // at one time
            System.Threading.Thread.Sleep(50);
        }
    }
}
